
<%@page import="book.util.Library_card"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@	page language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'bookyue.jsp' starting page</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

  </head>
  
  <body>
   <h1>查看借阅人</h1>
   <a href="booker.jsp">返回</a>
<a href="jsp/bookjie.jsp">借阅</a>
   <%List<Library_card> lylist =(List<Library_card>)session.getAttribute("lylist");%>
   <table border="1" align="center" width="500">
   <tr>
   <td>卡号</td>
   <td>姓名</td>
   <td>单位</td>
   <td>身份</td>
   </tr>
 
 	<c:choose> 
  <c:when test="${empty lylist}"> 
  	<%--   <c:redirect url="../library_cardServlet?opr=findAlllibrary_card"></c:redirect>  --%>  
  	 <% response.sendRedirect("../library_cardServlet?opr=findAlllibrary_card"); %>  
 	 </c:when> 
 	 <c:otherwise> 
 	 <c:forEach items="${lylist}" var="library_card"> 
 	 <tr>
   <td>${library_card.card_ID}</td><br>
   <td>${library_card.username}</td><br>
   <td>${library_card.company}</td><br>
   <td>${library_card.type}</td> <br>
   <td><a href="library_cardServlet?opr=del&card_ID=${library_card.card_ID}">删除</a>
   </td>
 	</tr>
 	</c:forEach> 
  	</c:otherwise>
 	</c:choose> 
       </table>
  </body>
</html>
